home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17055 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  13.1 KB

  1. Path: newsfeed.concentric.net!news
  2. From: "Alan L. Lovejoy" <alovejoy@concentric.net>
  3. Newsgroups: comp.lang.java,comp.lang.c++,comp.lang.smalltalk
  4. Subject: Re: Will Java kill C++?
  5. Date: Sat, 13 Apr 1996 04:04:21 -0700
  6. Organization: Modulation
  7. Message-ID: <316F8A35.5189@concentric.net>
  8. References: <31682FFE.2781E494@bbn.com> <DpJyGG.FKK@hkuxb.hku.hk> <denatale-1004960822260001@grail1506.nando.net> <dbell-1104960125190001@wholder2.cts.com> <goochb.327.000893D1@rwi.com> <dbell-1104961159050001@wholder2.cts.com> <316D8523.74D7@concentric.net> <dbell-1104962256020001@wholder2.cts.com> <316E3FB6.38F7@concentric.net> <dbell-1204961508460001@wholder2.cts.com>
  9. NNTP-Posting-Host: cnc009052.concentric.net
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.01Gold (Win95; U)
  14.  
  15. Doug Bell wrote:
  16. > In article <316E3FB6.38F7@concentric.net>, alovejoy@concentric.net wrote:
  17. > > Doug Bell wrote:
  18. > > >
  19. > > > In article <316D8523.74D7@concentric.net>, alovejoy@concentric.net wrote:
  20. > > >
  21. > > > > Would you consider VisualBasic to be a workhorse language?  Are there
  22. > > > > or are there not many useful programs written in VisualBasic that
  23. > > > > are widely-used?
  24. > > >
  25. > > > Yes.  And yes.
  26. > >
  27. > > If both Java and VisualBasic are suitable as "workhorse languages," what
  28. > > is it that disqualifies Smalltalk?
  29. > Well, you left out my definition of workhorse language from my post:
  30. > "I would define a 'workhorse' language to be one which is used by a large
  31. > body of people to produce useful software which is used on a regular
  32. > basis."
  33. > *Maybe* Smalltalk has grown into this role (from the number of people
  34. > jumping on me for my original post, I might consider this :), but you tell
  35. > me: Does Smalltalk meet that definition?  Honestly, now, is there a "large
  36. > body of people" using it?
  37.  
  38. Well, define "large."  
  39.  
  40. And someone will have to tell both of us what the headcount of Smalltalk
  41. programmers is.  Tens of thousands, certainly.  Perhaps hundreds of
  42. thousands.  Does anyone have solid data?  I've seen a yearly growth
  43. rate of 200% quoted, but that's not an absolute number.
  44.  
  45. > > Smalltalk's age is irrelevant. What is relevant is that the ever-increasing
  46. > > capabilities and performance of the hardware have made it suddenly very
  47. > > viable--so much so, that a language with very similar performance constraints
  48. > > and resource requirements is now the hottest computer language in two
  49. > > decades.
  50. > Well, I think you miss the big picture if you are going to compare Java's
  51. > resource requirements to Smalltalk's.  Interpreted Java is a transistion
  52. > which I suspect will be left behind sooner rather than later.  The
  53. > resource requirements of Java should actually be lighter than those of
  54. > several conventional languages, with perhaps an exception made for it's
  55. > less efficient use of memory than most conventional languages.
  56. > I wouldn't be interested in Java if I thought that the Java we have today
  57. > was the Java we will have in six to nine months.  If I though it was going
  58. > to be ten years before Java's current resource short-comings were
  59. > addressed, I'd also not be interested, at least not for ten years, at
  60. > which time I suspect there would be something more relevant to the current
  61. > environment than Java which would warrant my attention.  ;)
  62.  
  63. Firstly, if Java is to be used to code applets on WWW pages, then it will
  64. always be interpreted (when used for that purpose)--unless the world happens
  65. to standardize on exactly one instruction set to the exclusion of all others.
  66.  
  67. But of course, there is no reason that Java can not be used outside the
  68. context of WWW pages--in which case the need for wide portability of the
  69. object code does not have quite as high a priority.  However, given the 
  70. language semantics, the same technical difficulties must be overcome to 
  71. compile Java in the way that is traditional for C-like languages as would 
  72. have to be overcome to do this for Smalltalk.  I think this can be done.  
  73. I think it will be done--for both languages.  But C-style compilation is 
  74. important not because it makes the code faster (it probably will NOT make 
  75. either Java or Smalltalk as fast as C for many common algorithms, although 
  76. it may do that in some cases).  The importance of C-style compilation is in 
  77. the fact that it permits a program to be statically linked together with
  78. only the code needed for that application, and it permits dynamic linking
  79. from shared libraries.  The Smalltalk image is a great development
  80. environment.  It is NOT a good deployment vehicle.  The sooner the
  81. Smalltalk vendors realize this, the better.  One of the things I really
  82. like about Java is that it may beat the Smalltalk vendors over the head
  83. with this fact so painfully that they will finally take action.
  84.  
  85. If CLOS (an OO LISP) can be compiled into a traditional "native code" 
  86. executable, there is no reason that the same could not be done for either 
  87. Smalltalk or Java.  
  88.  
  89. > > If "a tool can't meet the requirements necessary to fit the demands of the
  90. > > market" because of its technical shortcomings, then you have a point.  If
  91. > > the tool is rejected by the market because a) there was not a sufficient
  92. > > supply of trained/experienced talent; b) the market had no confidence in
  93. > > the tool because it was not blessed by <insert name of market-dominating
  94. > > company of your choice here>; or c) because the market was going ga-ga over
  95. > > some other tool that was no better (perhaps even worse) than another, and was
  96. > > in no mood to even hear about any tool other than the one it had become
  97. > > infatuated with--then you can't really blame the tool for being no good,
  98. > > can you?
  99. > I'm not "blaming" Smalltalk.  As you and others have pointed out, there
  100. > are environments and projects for which Smalltalk is apporpriate.  But
  101. > Smalltalk had all the advantages (time to mature and innovate, dedicated
  102. > group of proponents, real-world application) over Java to be what Java is
  103. > (net-based, providing a solution for which there is a demand, and easy to
  104. > learn and assimilate for a large base of programmers), and failed.  So
  105. > Java is the better tool for many projects than Smalltalk for these
  106. > reasons.
  107.  
  108. There is no **technical** reason that Sun could not have chosen Smalltalk
  109. to fill the roles envisioned for either Oak or Java.  For Java's role,
  110. they merely needed their own Smalltalk VM with the appropriate security
  111. features built in.  Back in 1986, the ParcPlace VM was only about 350k,
  112. if I remember correctly, and the image was about 1.2 meg.  Even that
  113. image/VM had several times more functionality than the current JDK.  
  114. I'm not exagerating--I may even be understating the case.  Back then,
  115. Smalltalk had to do all the graphics, windowing, rendering text into
  116. multiple fonts/styles and so forth that today is usually handled by
  117. the host platform windowing system.
  118.  
  119. I suspect they passed over Smalltalk for business reasons, such as the
  120. desire to completely control the language and its implementation.  The
  121. prejudices of many towards C-like syntax may have played a part, as well.
  122. The fact that they wanted to keep Gosling, and he wanted to implement
  123. a new language, may have something to do with what happened, as well.
  124.  
  125. Smalltalk's capability to do metaprogramming and reflection make it much
  126. better at dealing with the issues of distributed computing than Java
  127. could ever be.  And Smalltalk is at least as capable of communicating
  128. over the internet as Java is.  Building Java-style security into an
  129. applet-specific Smalltalk VM would be no more difficult than doing the 
  130. same for Java.
  131.  
  132. The only failure of Smalltalk is that no one with sufficient wherewithal
  133. had the vision to try this until Sun came along--but promoting Java instead 
  134. of Smalltalk.  The Smalltalk community can fairly be blamed for failing to
  135. capitalize on its opportunities. 
  136.  
  137. > Now if the Smalltalk people want to quit sulking over Java's sudden and
  138. > rapid interest and do something to change the situation for the better,
  139. > they should figure out how to adapt Smalltalk to this task.  If you build
  140. > it, they will come.  If they don't come, you haven't built what they
  141. > need.  It's not politics and the stupidity of the masses, it's survival of
  142. > the fittest and the fitness of the tool.
  143.  
  144. Yup.
  145.  
  146. > To give a short analogy (please no flames on this, that belongs in a
  147. > different newsgroup), I use a Mac.  I am convinced that a Mac is a better
  148. > tool than a Windows-based PC.  Why, then, is not the Mac the dominant
  149. > tool?  Two reasons: 1) it was too expensive for a long time; and 2) it was
  150. > not an open system and the pace of innovation was limited to a large
  151. > extent to what Apple could manage.  I blame the tool for this.  It doesn't
  152. > stop me from trying to promote it, but I don't blame everyone who bought a
  153. > PC for the failings of the Mac.  Nor do I mark it up to "prejudice,
  154. > ignorance, politics, inertia and the tendency to copy what others are
  155. > doing".
  156.  
  157. Your analogy between the Mac and Smalltalk is more apt than you may know.
  158.  
  159. But the Mac is not responsible for its failure.  Apple is.
  160.  
  161. As Ken Auer once said, "If Smalltalk succeeds, it will be in spite of
  162. ParcPlace."
  163.  
  164. Fortunately, the Mac and Apple are not dead yet.  Nor is Smalltalk.
  165.  
  166. Where there's life, there's hope.
  167.  
  168. > But it doesn't follow that you should use Samlltalk whereever you might
  169. > consider using Java, which is what some in this thread have seemed to
  170. > suggest.
  171. > > No one language is right for every and all tasks.
  172. > Ahhh, harmony!  We certainly agree here.
  173.  
  174. The main differences between Java and Smalltalk (as languages, not as development
  175. environments or delivery platforms):
  176.  
  177. 1. Java is statically typed, Smalltalk is not (although both use dynamic binding).
  178. 2. Smalltalk has block closures.  Java doesn't even have function pointers.
  179. 3. Smalltalk is highly reflexive and permits metaprogramming.  Java isn't and
  180. doesn't (compared to Smalltalk).
  181. 4. There are massive syntactical differences that are the fodder for religious
  182. wars, but have no fundamental significance.  The full grammar of Smalltalk
  183. can be expressed in about twenty EBNF statements. If it takes you longer
  184. than a day to learn the syntax, you should consider changing professions.
  185.  
  186. A reason to use one language instead of the other would have to be justified
  187. either by one of the technical issues listed above, by differences in the
  188. available class libraries and/or middleware, or else by business considerations 
  189. such as we have already mentioned.  Oh, and of course the maturity of the
  190. development tools would have to be considered.  Is that a technical or a
  191. business issue?
  192.  
  193. > >>> Example: one could use modern linguistic science to design a much better
  194. > >>> language than English or any other natural language.  Aren't you excited
  195. > >>> by the prospect of using such a language?  I know, you just can't wait
  196. > >>> to learn and start using this language.  Right?
  197. > >>
  198. > >> Wrong.  Your natural language doesn't meet the requirements necessary to
  199. > >> fit the demands of the market, pool of available talent, and integration
  200. > >> with existing systems and infrastructure, so it isn't a better tool than
  201. > >> the existing language, despite it's technical merits.
  202. > >
  203. > > Precisely my point.  The corollary is that the fact that a tool has failed
  204. > > in the market does not prove that the tool is technically flawed, or that
  205. > > it could not possibly be much better from a technical standpoint than the
  206. > > more popular tools.
  207. > >
  208. > > --Alan
  209. > Well, it's really a difference of symantecs here, but the technical
  210. > evaluation includes, IMHO, the suitability to the environment.  For
  211. > example, your hypothetical language could either be designed to accomplish
  212. > it's technical improvement AND be as familiar as possible to current users
  213. > of English, or it could be designed purely on linguistic merits with no
  214. > compromises to the existing base of users.  Which would be the
  215. > "technically superior" language?  It would depend, in part, on how you
  216. > define "technically superior".
  217.  
  218. Yup. I try to keep politics, sociology, cultural anthropology and linguistics
  219. separated--except when multidisciplinary thinking seems to be called for.
  220.  
  221. > Doug Bell
  222. > dbell@shvn.com
  223.  
  224. For those who have never seen Smalltalk code, here is an example (for VisualWorks, 
  225. which is like saying "for the MFC libraries" or "for Motif" in the context of C++):
  226.  
  227. The following code opens a window that displays the text for "Hello, Java!":
  228.  
  229. | window |             "<--Declares a temporary variable named 'window'"
  230.  
  231. window := ScheduledWindow new.    "<--Assigns an instance of ScheduledWindow to 'window'"
  232.  
  233. window component: 'Hello, Java!' asText asComposedText. 
  234.  
  235.                 "^--Assigns a visual object that displays itself as 
  236.                 the text for 'Hello, Java!' to be the component of 
  237.                 the window; 'asText' is a message to the string
  238.                 'Hello, Java!', 'asComposedText' is a message to
  239.                 the Text object that is returned by the 'asText'
  240.                 message; 'component:' is a one-argument message
  241.                 to the instance of ScheduledWindow"
  242.  
  243. window open            "<--Opens the window"
  244.  
  245. That's it. Of course, this could be written all as one statement, on one line:
  246.  
  247. (ScheduledWindow new component: 'Hello, Java!' asText asComposedText) open.
  248.  
  249. Specifying the font, point size, style and color of the text could be done
  250. with just a few extra message sends.  Still on one line in one statement, if
  251. that suited your fancy.  
  252.  
  253. --Alan
  254.